<?
require_once('common.php');

$pageContents = ob_get_clean();
$all = file_get_contents('template.html');
$pageNaviText = "";
$i = 0;
foreach($pageNavi as $k => $v) {
	if($i > 0) $pageNaviText .= " | ";
	$pageNaviText .= "<a href='$v'>$k</a>\n";
	$i++;
}
$pageNaviText .= " | zalogowany jako: ".$_SESSION['kd_login'];
$all = str_replace('PAGE_NAVI', $pageNaviText, $all);
$all = str_replace('PAGE_TITLE', $pageTitle, $all);
$all = str_replace('PAGE_BODY', $pageContents, $all);
$all = str_replace('PAGE_SQL_DUMP', $sqlDump, $all);
echo $all;
?>
